#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <limits.h>


int main()
{
	int arr[500];//arr[50000];
	int i = 0, max = INT_MIN;
	do
	{
		scanf("%d", &arr[i]);
		if (max < arr[i])
			max = arr[i];
		i++;
	} while (getchar() != '\n');
	int sz = i;
	int count = sz / 2;
	int arr1[500] = { 0 };//int arr1[max];
	for (i = 0; i < sz; i++)
	{
		arr1[arr[i]]++;
	}
	for (i = 0; i <= max; i++)
	{
		if (arr1[i] >= count)
			printf("%d ", i);
	}
	printf("\n");
	return 0;
}